1. Field of the Invention
The present invention relates to an automatic programming method, and more particularly, to an interpolation method in an automatic programming, which is capable of properly determining and programming target amounts of movement of individual axes to be used in each interpolation cycle at the time of execution of a numerical control program for contour control.
2. Description of the Related Art
A so-called contour control for machining a workpiece into a desired profile is conventionally known, in which actuators such as servomotors for the individual axes of a machine tool are driven under the control of a numerical control unit, to thereby move a tool along a target movement path. Generally, in such contour control, target movement data for each interpolation cycle is sequentially supplied from the numerical control unit at intervals of a predetermined interpolation cycle. In a case in which target positions of the servomotors for the individual axes are calculated on a real time basis by the interpolation process based on this movement data, the machining speed is decreased if a time period required for the calculation is long. Therefore, from the viewpoint of improving the machining speed, it is desired to create that numerical control program for the contour control in which the target positions of the individual axes in each interpolation processing cycle are previously programmed as execution data.
To this end, conventionally, the target amounts of movement of the servomotors for the individual axes in each of sub-sections are calculated and then programmed as execution data, the sub-sections being obtained by dividing each section, defined by the starting point A (FIGS. 6 and 7) of an associated one block of the numerical control program consisting of a series of blocks and the target end point (starting point of the next block) B of the same block determined by the movement command value of this block, by a length equal to a target movement amount P (the product of the target moving speed and one interpolation period) per interpolation period. If the target movement amount P per interpolation period does not divide the movement command, i.e., if the last sub-section is shorter than the target movement amount P (FIG. 6), an overlapping process is effected to derive an intersection b1 at which a sphere, having the starting point an of the last sub-section as its center and the target movement amount P as its radius, crosses the target movement path of the next block. Then, the derived intersection b1 is used as the target end point of the last sub-section of one of the blocks relating to the overlapping process (which end point corresponds to the starting point of the first sub-section of the other block).
According to the numerical control program created by the above overlapping process, as far as an angle .theta. between the target movement paths of the two blocks relating to the overlapping process is small, the target movement amounts of the individual axes in the last interpolation cycle of one of the two blocks relating to the overlapping process (the first interpolation cycle of the other block) will not be set to such an inappropriate value as to cause the target path (indicated by a broken line in the drawing) obtained after the overlapping process to be excessively deviated from the originally intended path (shown by a solid line in the drawing) and thus degradation in the machining precision. However, as the angle .theta. between the two target movement paths becomes larger, the target movement amounts for the individual axes after the overlapping process will be more inappropriate, thus lowering the machining precision (FIG. 7).